//
//  lawIntroduceView.m
//  XJMTechnician
//
//  Created by 洗脚么_one on 2017/12/6.
//  Copyright © 2017年 Mr.hu. All rights reserved.
//

#import "lawIntroduceView.h"

@implementation lawIntroduceView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self == [super initWithFrame:frame]) {
        
        CGFloat tenfloat = 10;
        CGFloat widthcancelbind = ScreenWidth-50;
        CGFloat heightcancelbind = ScreenWidth;
        
        UIView * subview = [[UIView alloc]initWithFrame:CGRectMake(25, (ScreenHeight - heightcancelbind)*2/5, widthcancelbind, heightcancelbind)];
        subview.backgroundColor = [UIColor whiteColor];
        subview.layer.cornerRadius = 15;
        subview.userInteractionEnabled = YES;
        [self addSubview:subview];
        
        _titlelawlab = [[UILabel alloc]init];
        _titlelawlab.textColor = RGBA(51, 51, 51, 1);
        _titlelawlab.font = [UIFont systemFontOfSize:15];
        _titlelawlab.textAlignment = NSTextAlignmentCenter;
        [subview addSubview:_titlelawlab];
        [_titlelawlab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(17.5);
            make.centerX.mas_equalTo(0);
            make.size.mas_equalTo(CGSizeMake(widthcancelbind,15));
        }];
        
        UIView * defaultSubView = [[UIView alloc]initWithFrame:CGRectMake(0, 50, widthcancelbind, 1)];
        defaultSubView.backgroundColor = RGBA(153, 153, 153, 0.6);
        [subview addSubview:defaultSubView];
        
        self.MainScrollView = [[UIScrollView alloc]init];
        self.MainScrollView.delegate = self;
        self.MainScrollView.showsVerticalScrollIndicator = NO;
        self.MainScrollView.contentSize = CGSizeMake(widthcancelbind-tenfloat*6, heightcancelbind*1.2);
        [subview addSubview:self.MainScrollView];
        [self.MainScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(defaultSubView.mas_bottom).offset(0);
            make.left.mas_equalTo(tenfloat*3);
            make.size.mas_equalTo(CGSizeMake(widthcancelbind-tenfloat*6, heightcancelbind-tenfloat*13));
        }];
        
        self.DetailablLab = [[WJLabel alloc]initWithFrame:CGRectMake(0, 20, widthcancelbind-tenfloat*6, (heightcancelbind-tenfloat*13-20)*2.2)];
        self.DetailablLab.textColor = RGBA(102, 102, 102, 1);
        self.DetailablLab.numberOfLines = 0;
        self.DetailablLab.textAlignmentwj = LQTextAlignmentTop;
        self.DetailablLab.font = [UIFont systemFontOfSize:13];
        self.DetailablLab.textAlignment = NSTextAlignmentLeft;
        
        [self.MainScrollView addSubview:self.DetailablLab];
        
        self.LawSureBtn =[[UIButton alloc]init];
        [self.LawSureBtn setTitle:@"确定" forState:UIControlStateNormal];
        self.LawSureBtn.titleLabel.font = [UIFont systemFontOfSize:15];
        self.LawSureBtn.layer.cornerRadius = 20;
        self.LawSureBtn.layer.masksToBounds = YES;
        [self.LawSureBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self.LawSureBtn setBackgroundColor:RGBA(213, 32, 30, 1)];
        [subview addSubview:self.LawSureBtn];
        [self.LawSureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(-tenfloat*2);
            make.centerX.mas_equalTo(0);
            make.size.mas_equalTo(CGSizeMake(widthcancelbind-tenfloat*10, 40));
        }];
        
    }
    return self;
}

@end
